package com.java_base.array_study;

public class ArrayDemo05 {
    public static void main(String[] args) {
        // 目标：掌握数组动态初始化默认规则
        // 整型的数组默认值都是0
        byte[] bytes = new byte[3];
        System.out.println(bytes[0]);
        short[] shorts = new short[3];
        System.out.println(shorts[0]);
        int[] ints = new int[3];
        System.out.println(ints[0]);
        long[] longs = new long[3];
        System.out.println(longs[0]);
        // 浮点型的默认值都是0.0
        double[] doubles = new double[3];
        System.out.println(doubles[0]);
        float[] floats = new float[3];
        System.out.println(floats[0]);
        // 布尔类型的默认值都是false
        boolean[] booleans = new boolean[3];
        System.out.println(booleans[0]);
        // 引用类型的默认值都是null
        String[] strings = new String[3];
        System.out.println(strings[0]);
        // 字符型默认值为
        char[] chars = new char[3];
        System.out.println((int) chars[0]);


    }
}
